package com.huaxingbankas.modules.model.backup;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;

/**
 * AbstractFirstMenu entity provides the base persistence definition of the
 * FirstMenu entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractFirstMenu implements java.io.Serializable {

	// Fields

	private Integer id;
	private String name;
	private String firstMenuPriority;
	private String firstMenuComment;
	private String defaultValue;
	private Set<SecondMenu> secondMenus = new HashSet<SecondMenu>(0);

	// Constructors

	/** default constructor */
	public AbstractFirstMenu() {
	}

	/** full constructor */
	public AbstractFirstMenu(String name, String firstMenuPriority,
			String firstMenuComment, String defaultValue,
			Set<SecondMenu> secondMenus) {
		this.name = name;
		this.firstMenuPriority = firstMenuPriority;
		this.firstMenuComment = firstMenuComment;
		this.defaultValue = defaultValue;
		this.secondMenus = secondMenus;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name", length = 32)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "first_menu_priority", length = 32)
	public String getFirstMenuPriority() {
		return this.firstMenuPriority;
	}

	public void setFirstMenuPriority(String firstMenuPriority) {
		this.firstMenuPriority = firstMenuPriority;
	}

	@Column(name = "first_menu_comment", length = 32)
	public String getFirstMenuComment() {
		return this.firstMenuComment;
	}

	public void setFirstMenuComment(String firstMenuComment) {
		this.firstMenuComment = firstMenuComment;
	}

	@Column(name = "default_value", length = 32)
	public String getDefaultValue() {
		return this.defaultValue;
	}

	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "firstMenu")
	public Set<SecondMenu> getSecondMenus() {
		return this.secondMenus;
	}

	public void setSecondMenus(Set<SecondMenu> secondMenus) {
		this.secondMenus = secondMenus;
	}

}